[NET] Make MAX_SKBUFF_ORDER page-size independent.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 3 Oct 2006 10:39:22 +0000 (11:39 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 3 Oct 2006 10:39:22 +0000 (11:39 +0100)
Original patch from Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/drivers/xen/core/skbuff.c

index a4a2e4edcec2ed1d85de62ef37761b0e4164f904..2fa88069c480d195229ab963fbb53786dd5abb70 100644 (file)
 /*static*/ kmem_cache_t *skbuff_cachep;
 EXPORT_SYMBOL(skbuff_cachep);
 
-#define MAX_SKBUFF_ORDER 4
+/* Allow up to 64kB or page-sized packets (whichever is greater). */
+#if PAGE_SHIFT < 16
+#define MAX_SKBUFF_ORDER (16 - PAGE_SHIFT)
+#else
+#define MAX_SKBUFF_ORDER 0
+#endif
 static kmem_cache_t *skbuff_order_cachep[MAX_SKBUFF_ORDER + 1];
 
 static struct {